<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
            //1.接收用户输入
            var year = prompt("请输入年份");
            //2.闰年判断
            var res = year % 400 == 0 || (year % 4 == 0 && year % 100 !=0);
            console.log(year+"是闰年吗?",res);
            
    </script>
</head>
<body>
    
</body>
</html>